<?xml version="1.0" encoding="utf-8" ?> 

<warehouse>
	<rules>
		<ruleset concept="Dimension">
			<name-rule suffix=" Dimension" />
			<entity-pk-rule use-entity-name="True" suffix=" Key" type="Int" />
		</ruleset>
	</rules>
	<marts>
		<mart name="Allocations Mart">
			<fact name="Allocation">
				<dimensions>
					<dimension name="Line Number" type="Degenerate" data-type="Int" />
					<dimension name="Effective Date" ref="Date" />
					<dimension name="Appropriation" />	
						<!-- 
							ref will default to @name + /ruleset[ @concept = 'Dimension' ]/entity-pk-rule/@suffix ( Key)
							name will add /ruleset[ @concept = 'Dimension' ]/name-rule/@suffix ( Dimension)
						-->
					<dimension name="Financial Plan" />
					<dimension name="Program" />
					<dimension name="Project" />
					<dimension name="Allotment Office" />
					<dimension name="Object" />
				</dimensions>
				<measures>
					<measure name="Plan Amount" type="Currency" />
					<measure name="Committed Amount" type="Currency" />
					<measure name="Obligated Amount" type="Currency" />
					<measure name="Expended Amount" type="Currency" />
					<measure name="Committed Obligated Amount" type="Currency" />
					<measure name="Available Amount" type="Currency" />
				</measures>
			</fact>
			<dimensions>
				<dimension name="Effective Date">
					<!-- name will add /ruleset[ @concept = 'Dimension' ]/name-rule/@suffix ( Dimension) -->
					<fields>
						<!-- Key will be added according to /ruleset[ @concept = 'Dimension' ]/entity-pk-rule -->
						<field name="Date" type="DateTime" />
						<field name="Long Date Description" type="Varchar" />
						<field name="Short Date Description" type="Varchar" />
						<field name="Day Of Week" type="Int" />
						<field name="Day Of Month" type="Int" />
						<field name="Week Of Month" type="Int" />
						<field name="Fiscal Week" type="Int" />
						<field name="Fiscal Month" type="Varchar" type="Int" />
						<field name="Fiscal Quarter" type="Int" />
						<field name="Fiscal Half" type="Int" />
						<field name="Fiscal Year" type="Int" />
						<field name="Calendar Week" type="Int" />
						<field name="Calendar Month" type="Varchar" />
						<field name="Calendar Quarter" type="Int" />
						<field name="Calendar Half" type="Int" />
						<field name="Calendar Year" type="Int" />
						<field name="Is Holiday" type="Bit" />
						<field name="Is Weekday" type="Bit" />
					</fields>
				</dimension>
				<dimension name="Appropriation">
					<fields>
						<field name="Appropriation Code" type="Varchar" />
						<field name="Appropriation Title" type="Varchar" />
					</fields>
				</dimension>
				<dimension name="Financial Plan">
					<fields>
						<field name="Plan Code" type="Varchar" />
						<field name="Plan Title" type="Varchar" />
					</fields>
				</dimension>
				<dimension name="Program">
					<fields>
						<field name="Program Code" type="Varchar" />
						<field name="Program Title" type="Varchar" />
					</fields>
				</dimension>
				<dimension name="Project">
					<fields>
						<field name="Project Code" type="Varchar" />
						<field name="Project Title" type="Varchar" />
					</fields>
				</dimension>
				<dimension name="Allotment Office">
					<fields>
						<field name="Allotment Office Code" type="Varchar" />
						<field name="Allotment Office Title" type="Varchar" />
					</fields>
				</dimension>
				<dimension name="Object" pk-field="Object">
					<fields>
						<field name="Object Code" type="Varchar" />
						<field name="Object Title" type="Varchar" />
					</fields>
				</dimension>
			</dimensions>
		</mart>
	</marts>
</warehouse>
